import { ICommonDataRes, IDataBase } from "@/types";

/**
 * 菜单数据与按钮数据类型
 */
export interface IPermission extends IDataBase {
  pid?: string;
  code?: string;
  toCode?: string;
  type?: number;
  status?: number;
  level?: number;
  select?: boolean;
  children?: IPermission[];
}

export type IMenuParams = Pick<
  IPermission,
  "name" | "code" | "pid" | "level" | "_id"
>;

// export type IPermissionTree = ITreeNode<IPermission>;
/**
 * 菜单数据与按钮数据类型集合
 */
// export type IPermissionList = Array<IPermission>;

export type IPerResCommonData = ICommonDataRes;

/**
 * 权限返回数据接口
 */
export type IPermissionResponsData = ICommonDataRes<Array<IPermission>>;
